package com.sense.kukoo.common.wiget.state

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.widget.TextView
import com.sense.kukoo.common.R
import com.zy.multistatepage.MultiState
import com.zy.multistatepage.MultiStateContainer

class PreloginSubscriptionsState : MultiState() {

    private var listener: ()->Unit = {}

    override fun onCreateMultiStateView(
        context: Context,
        inflater: LayoutInflater,
        container: MultiStateContainer
    ): View {
        return inflater.inflate(R.layout.common_state_prelogin_subscriptions, container, false)
    }

    override fun onMultiStateViewCreate(view: View) {
        view.findViewById<TextView>(R.id.tv_btn_sign_in).setOnClickListener {
            listener()
        }
    }

    fun onSignIn(l: ()->Unit) {
        listener = l
    }
}